package com.yuyi.exception;

import java.io.IOException;

import javax.naming.AuthenticationException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.shiro.authz.UnauthenticatedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.yuyi.full.handler.exception.OrgException;
import org.yuyi.full.handler.exception.ResultBO;

@ControllerAdvice
public class RepLoginException {

    /**
               * 登录认证异常
     * @throws IOException 
     */
    @ExceptionHandler({UnauthenticatedException.class, AuthenticationException.class })
    public ResultBO<?> authenticationException(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException {          	
    	throw new OrgException(WXTExceptionEnum.EXCEPTION_NOWKNDENGLU);
    }
 
}